﻿<phone:PhoneApplicationPage
    x:Class="ChinaUnicom.Views.SigningPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"    
    mc:Ignorable="d"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False"
    toolkit:TiltEffect.IsTiltEnabled="True" d:DesignHeight="800" d:DesignWidth="480">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:SlideTransition Mode="SlideLeftFadeIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:SlideTransition Mode="SlideLeftFadeIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:SlideTransition Mode="SlideLeftFadeOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:SlideTransition Mode="SlideLeftFadeOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" >
            <Rectangle Style="{StaticResource PageTopRectangleStyle}"/>
            <Border Style="{StaticResource PageTopBorderStyle}">
                <TextBlock Text="联通助手" Style="{StaticResource PageTopTextStyle}"/>
            </Border>
        </StackPanel>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="1" Margin="12,10,0,28">
            <TextBlock Text="正在登录" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="80"/>
            </Grid.RowDefinitions>
            <ScrollViewer Margin="12,0,12,0">
                <Grid>
                    <RichTextBox VerticalAlignment="Top">
                        <Paragraph>
                            <Run Text="{Binding Tips}" 
                                 Foreground="{Binding TipsForeground}"
                                 FontSize="28"/>
                        </Paragraph>
                    </RichTextBox>
                    <ProgressBar IsEnabled="True" IsIndeterminate="{Binding IsIndeterminate}" Visibility="{Binding ProgressVisibility}" VerticalAlignment="Center"/>
                </Grid>
            </ScrollViewer>
            <Grid Grid.Row="1" Background="{StaticResource PhoneChromeBrush}" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="180"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="180"/>
                </Grid.ColumnDefinitions>
                <Button Grid.Column="0" Content="重试" Command="{Binding RetryCommand}" />
                <Button Grid.Column="2" Content="{Binding CancelOrContinueText}"  Command="{Binding CancelOrContinueCommand}" Visibility="Collapsed"/>
            </Grid>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>